<?php
include "db.php";

if ($user_id<1){
    die("请先登录");
}
?>
<!doctype html>
<html lang="zh-CN">

<head>

    <?php include("header.php") ?>
    <title>留言板 美化版</title>
</head>

<body>

    <div class="container">
        <?php include("menu.php") ?>
        <div class="row">
            <div class="col-6 offset-3">
                <img src="<?php echo getAvatar($user_id) ?>" class="img-thumbnail">
                <form action="avatar_save.php" method="POST" enctype="multipart/form-data">
                    <div class="form-group">
                        <label>请上传头像</label>
                        <input type="file" name="avatar">
                    </div>
                    <button type="submit" class="btn btn-primary">上传</button>
                </form>
            </div>
        </div>
    </div>
</body>

</html>